package com.jnu.myapplication.addEditfragment;

import com.jnu.myapplication.DataBase.TypeBean;
import com.jnu.myapplication.DataBase.dataManager;
import com.jnu.myapplication.R;

import java.util.List;

/**
 * 收入记录页面
 */
public class IncomeFragment extends baseEditFragment{


    @Override
    public void loadDataToGV() {
        super.loadDataToGV();
        //获取数据库当中的数据源
        List<TypeBean> inlist = dataManager.getTypeList(1);
        typeList.addAll(inlist);
        adapter.notifyDataSetChanged();
        typeTv.setText("其他");
        typeIv.setImageResource(R.mipmap.user_f);
    }

    @Override
    public void saveAccountToDB() {
        accountBean.setKind(1);
        dataManager.insertItemToAccounttb(accountBean);
    }


}